/*
* 封装 mssql 操作
* 读取地磅数据（托利多系统）
*/
const mssql_async = require('../lib/mssql/MssqlDb');
const Utils = require('../lib/util/Utils');

exports.getAvsGroupByRange = async (start_time, end_time)=>{
    let sql = "SELECT product, SUM(net) as value, count(id) as num FROM Trade where seconddatetime >= '" + start_time + "' and seconddatetime <= '" + end_time + "' group by product";
    let datalist = await mssql_async(sql);
    return datalist.recordset;
};
